<%@ page language="java" contentType="text/html; charset=gbk"
    pageEncoding="gbk"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gbk">
<title></title>
</head>
<body>
<%
		out.clear();
        out = pageContext.pushBody();
        String root = getServletContext().getRealPath("/");
        String path = "urlupload\\";
        String name = "model.xls";
        response.setContentType("application/msexcel");
        response.addHeader("Content-Disposition", "filename=\"" + name + "\"");
        try {
            java.io.OutputStream os = response.getOutputStream();          
            java.io.FileInputStream fis = new java.io.FileInputStream(root + path + name);
            byte[] b = new byte[1024];
            int i = 0;
            while ((i = fis.read(b)) > 0) {
                os.write(b, 0, i);
            }
            fis.close();
            os.flush();
            os.close();
        } catch (Exception ex) {
        }       
 %>
</body>
</html>